package com.geekaca.d3.testwhile;

import java.util.Scanner;

public class TestDeadLoop {
    public static void main(String[] args) {
        int pass = 5200;
        int input = 0;
        Scanner scanner = new Scanner(System.in);
        while (true) {

            System.out.println("请输入密码:");
            input = scanner.nextInt();
            if (pass == input) {
                System.out.println("密码正确");
                break;
            }else{
                System.out.println("输入不正确,请重新输入:");
            }
        }

        System.out.println("程序结束");
    }
}
